import Relay from "react-relay";

export default class GetEnterpriseListMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { getEnterpriseList }`;
    }

    getVariables() {
        return {
            argsInput: {
                entype: this.props.entype,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on getEnterpriseListPayload {
            data {
                errorCode
                value
                totalResult
                id
                enterpriseList{
                   address
                   enterpriseName
                   enterpriseId
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
              fragment on getEnterpriseListPayload {
                    data {
                        errorCode
                        value
                        totalResult
                        id
                        enterpriseList{
                           address
                           enterpriseName
                           enterpriseId
                        }
                    }
                }
            `]
        }];
    }

}


